home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / Dots & Pixels / headers / stereopair.h < prev    next >
C/C++ Source or Header  |  1995-09-29  |  1KB  |  55 lines

  1. #pragma once
  2.  
  3. class stereopair
  4. {
  5.     public:
  6.         stereopair( int breedte = 256, int hoogte = 256,
  7.                     int backDisparity = 8, CTabHandle cTable = nil);
  8.         ~stereopair();
  9.         
  10.         void CleanSheet() const;
  11.  
  12.         void AddRect( short x, short y, short width, short height,
  13.                         int leftDisparity = -4, int rightDisparity = 4) const;
  14.  
  15.         const gworld *GetImage() const;
  16.         const gworld *GetLeftImage() const;
  17.         const gworld *GetRightImage() const;
  18.  
  19.     private:
  20.         int my_leftDisparity;
  21.         int my_rightDisparity;        // always negative
  22.         //
  23.         // we maintain the following gworld instances:
  24.         //
  25.         // L            : the current left-eye image
  26.         // R            : the current right-eye image
  27.         // left_noise    : noise to blit at the left side of the left eye image
  28.         //                  (at the right side if my_leftDisparity < 0)
  29.         // right_noise    : noise to blit at the right side of the right eye image
  30.         //                  (at the left side if my_rightDisparity > 0)
  31.         // LR            : the combined Left and Right eye images
  32.         //
  33.         Rect leftNoiseRect;            // rects used in blitting left_noise to L
  34.         Rect leftNoiseImageRect;
  35.         
  36.         Rect rightNoiseRect;        // rects used in blitting right_noise to R
  37.         Rect rightNoiseImageRect;
  38.         
  39.         gworld *L;
  40.         gworld *R;
  41.         gworld *left_noise;
  42.         gworld *right_noise;
  43.         gworld *LR;
  44. };
  45.  
  46. inline const gworld *stereopair::GetLeftImage() const
  47. {
  48.     return L;
  49. }
  50.  
  51. inline const gworld *stereopair::GetRightImage() const
  52. {
  53.     return R;
  54. }
  55.